//
//  SEGActivityDetailToolBarView.h
//  ExcellentHome
//
//  Created by 揭婧雯 on 2017/8/1.
//  Copyright © 2017年 陈区. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <SEGPlatform/SEGAdjustableButton.h>

static CGFloat activityToolBarNormalHeight = 44.0;
static CGFloat activityToolBarCommentHeight = 100.0;
static CGFloat activityToolBarCommentHeight_hlb = 49.0;

static NSString *activityToolBarDefalutDesc = @"我想说......(140字)";

typedef NS_ENUM(NSUInteger, SEGActivityDetailToolBarType) {
    SEGActivityDetailToolBarType_CollectComment = 0, /*征集类 有评论*/
    SEGActivityDetailToolBarType_CollectNoComment = 1 /*征集类 无评论*/
};

/**
 底部工具栏代理
 */
@protocol SEGActivityDetailToolBarDelegate <NSObject>

@optional
- (void)shouldShowInputView:(BOOL)showInputView;
- (void)praiseButtonAction;
- (void)sendButtonActionWithContent:(NSString *)content;

- (void)uploadButtonAction;
- (void)applyButtonAction;
- (void)attendButtonAction;
- (void)connectButtonAction;

//用于邻里圈区分是否点击了底部评论按钮
- (void)commentButtonClicked;
//用于活动是否点击了底部按钮
- (void)activityShouldShowInputView:(BOOL)showInputView;

@end

@interface SEGActivityDetailToolBarView : UIView
/**
 公用按钮（根据活动类别显示不同的样式和功能）
 */
@property (nonatomic, strong)SEGAdjustableButton *publicButton;

/**
 评论输入框
 */
@property (nonatomic, strong)UITextView *textView;
/**
 评论输入框提示标签
 */
@property (nonatomic, strong)UILabel *describeLabel;

/**
 是否一直显示评论界面
 */
@property (nonatomic, assign) BOOL alwaysShowCommentView;

@property(nonatomic, weak) id<SEGActivityDetailToolBarDelegate> delegate;

@property (nonatomic, assign) BOOL isFromActivity; ///< 标志是否在活动页面使用，活动页面不弹出键盘

/**
 * 设置 新邻里圈详情 界面底部工具栏
 * @param type 类型
 * @param isMyMarket 是否是我自己的集市
 */
- (void)hlb_setUpViewWithOperationType:(SEGNeighbourhoodOperationType)type
                            isMyMarket:(BOOL)isMyMarket
                          commentCount:(NSString *)commentCount
                              isLikeed:(BOOL)isLikeed
                             likeCount:(NSString *)likeCount;

/**
 * 设置邻里圈界面底部工具栏
 * @author Wendy
 * @param type 类型
 * @param isMyMarket 是否是我自己的集市
 */
- (void)setUpViewWithOperationType:(SEGNeighbourhoodOperationType)type isMyMarket:(BOOL)isMyMarket isLikeed:(BOOL)isLikeed likeCount:(NSString *)likeCount;

/**
 * 设置界面
 * @author Wendy
 * @param type 活动类型
 */
- (void)setUpViewWithType:(SEGActivityType)type
                   status:(SEGActivityStatus)status
                 isReview:(BOOL)isReview
                 isLikeed:(BOOL)isLikeed
                likeCount:(NSString *)likeCount
             triggerEvent:(NSString *)triggerEvent;

/// 设置底部工具栏样式（活动底部 有评论总数）
/// @param type 活动类型
/// @param status 活动状态
/// @param isReview isReview
/// @param isLikeed 是否点赞
/// @param likeCount 点赞个数
/// @param commentCount 评论个数
/// @param triggerEvent 事件
- (void)setupViewWithType:(SEGActivityType)type
                   status:(SEGActivityStatus)status
                 isReview:(BOOL)isReview
                 isLikeed:(BOOL)isLikeed
                likeCount:(NSString *)likeCount
             commentCount:(NSString *)commentCount
             triggerEvent:(NSString *)triggerEvent;

/**
 * 直接显示评论框
 * @author Wendy
 */
- (void)showCommentView;

/**
 显示评论界面
 @param placeholder 占位文字
 */
- (void)showCommentViewWithPlaceholder:(NSString *)placeholder;

/**
 * 隐藏评论框
 * @author Wendy
 */
- (void)hiddenCommentView;

/**
 * 线下活动根据报名审核状态修改按钮UI
 * @author Wendy
 * @param applyAuditStatus 报名审核状态
 */
- (void)changePublicButtonByApplyAuditStatus:(SEGActivityApplyAuditStatus)applyAuditStatus;

@end
